| Total Complexity | 1 | 
| Total Lines | 13 | 
| Duplicated Lines | 0 % | 
| Changes | 0 | ||
| 1 | import {writeFileSync} from 'fs' | 
            ||
| 6 | |||
| 7 | class SitesController { | 
            ||
| 8 | |||
| 9 |     executeLink = async (): Promise<void> => { | 
            ||
| 10 | const config = await getConfig()  | 
            ||
| 11 |         const domain = process.cwd().substring(process.cwd().lastIndexOf('/') + 1) | 
            ||
| 12 |         const hostname = `${domain}.${config.domain}` | 
            ||
| 13 | |||
| 14 | await ensureDirectoryExists(jaleSitesPath)  | 
            ||
| 15 | |||
| 16 |         await writeFileSync(`${jaleSitesPath}/${hostname}.conf`, nginxSiteConfig(hostname, process.cwd())) | 
            ||
| 17 | |||
| 18 | await (new Nginx()).reload  | 
            ||
| 19 | }  | 
            ||
| 23 | export default SitesController  |